local xingzhi = fk.CreateSkill {
    name = "lingling__xingzhi",
    tags = { Skill.Compulsory }
}
Fk:loadTranslationTable {
    ["lingling__xingzhi"] = "兴治",
    [":lingling__xingzhi"] = "锁定技，当一名角色使用一张装备牌时，你摸一张牌，然后将一张牌置于一旁称为“治”（至多五张“治”）。游戏开始时，你将牌堆顶两张牌置为“治”。",
    ["#lingling__xingzhi-push"] = "兴治：将一张牌置为“治”",
    ["lingling__xingzhi_power"] = "治",
}
xingzhi:addEffect(fk.CardUsing, {
    anim_type = "drawcard",
    can_trigger = function(self, event, target, player, data)
        return player:hasSkill(xingzhi.name) and data.card.type == Card.TypeEquip and #player:getPile("lingling__xingzhi_power") < 5
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        player:drawCards(1, xingzhi.name)
        if not player:isNude() and #player:getPile("lingling__xingzhi_power") < 5 then
            local card = room:askToCards(player, {
                min_num = 1,
                max_num = 1,
                include_equip = true,
                skill_name = xingzhi.name,
                cancelable = false,
                prompt = "#lingling__xingzhi-push",
            })
            player:addToPile("lingling__xingzhi_power", card, true, xingzhi.name)
        end
    end,
})

xingzhi:addEffect(fk.GameStart, {
    anim_type = "drawcard",
    can_trigger = function(self, event, target, player, data)
        return player:hasSkill(xingzhi.name)
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        local cards = room:getNCards(2)
        player:addToPile("lingling__xingzhi_power", cards, true, xingzhi.name)
    end,
})

return xingzhi
